package MTProxyServer;

/**
 * All Constants used in Money Tracker
 * @author King
 *
 */
public class MTConstant {
	
	public static final boolean MT_TCP_IS_LOCALHOST = false;
	
	// SQL Server Info
	public static final String MT_SQL_USERNAME = "moneytracker";
	public static final String MT_SQL_USERPW = "likeaboss";
	public static final String MT_SQL_DB = "moneytracker_proxydb";
	public static final String MT_SQL_HOST = "188.40.104.245:3306";
	
//	public static final String MT_SQL_USERNAME = "root";
//	public static final String MT_SQL_USERPW = "123123123";
//	public static final String MT_SQL_DB = "proxyserver";
//	public static final String MT_SQL_HOST = "127.0.0.1:3306";
	
	// Application Port
	public static final int MT_PORT = 1011;
	
	// Protocol Separator
	public static final char MT_REQ_ITEM_SEPARATER = 0x0;
	public static final char MT_REQ_RAW_DATA_SEPARATER = 0x1;
	
	// Update Type ID
	public static final int MT_ID_UPT_CREATE_TABLE = 0x2000;
	public static final int MT_ID_UPT_EDIT_TABLE = 0x2001;
	public static final int MT_ID_UPT_DELETE_TABLE = 0x2002;
	
	public static final int MT_ID_UPT_CREATE_PRODUCT = 0x2100;
	public static final int MT_ID_UPT_EDIT_PRODUCT = 0x2101;
	public static final int MT_ID_UPT_DELETE_PRODUCT = 0x2102;
	
	public static final int MT_ID_UPT_STOCK_TAKE_EVENT = 0x2103;
	
	
	// Request ID
	public static final int MT_REQID_REIGSTER = 0x1000;
	public static final int MT_REQID_SYNCHRONIZE_CONTACT_LIST = 0x1001;
	public static final int MT_REQID_CREATE_EVENT = 0x1002;
	public static final int MT_REQID_SYNCHRONIZE_DATA_FROM_LOCAL_DB = 0x1003;
	public static final int MT_REQID_SYNCHRONIZE_DATA_FROM_SERVER = 0x1004;
	public static final int MT_REQID_SYNCHRONIZE_LOCAL_DRIFT_EVENT = 0x1005;
	public static final int MT_REQID_STOCK_TAKE_EVENT = 0x1006;
	
	// General Request State
	public static final int MT_REQ_NO_READY = 0;
	public static final int MT_REQ_FINISH = 0x500;
	
	//-----------------
	// Register Request
	//------------------
	
	//---Client
	public static final int MT_REQ_CREG_SEND_PHONENUM = 0x101;
	public static final int MT_REQ_CREG_SEND_USER_INFO = 0x102;
	
	//---Server 
	public static final int MT_REQ_SREG_CHECK_PHONENUM = 0x101;
	public static final int MT_REQ_SREG_UPDATE_USER_INFO = 0x102;
	
	
	//---------------------------
	// Synchronize Contact List
	//---------------------------
	
	//--Client
	public static final int MT_REQ_CSYN_CTL_CHECK_PHONE_CONTACT = 0x120;
	public static final int MT_REQ_CSYN_CTL_SEND_USERID = 0x121;
	public static final int MT_REQ_CSYN_CTL_SEND_PHONENUM = 0x122;
	public static final int MT_REQ_CSYN_CTL_SEND_PHONENUM_LAST = 0x123;
	
	//--Server
	public static final int MT_REQ_SSYN_CTL_SEVRER_READY = 0x121;
	public static final int MT_REQ_SSYN_CTL_REPLY_PHONENUM = 0x122;
	public static final int MT_REQ_SSYN_CTL_REPLY_PHONENUM_LAST = 0x123;
		
	//-----------------
	// Create Event
	//------------------
	
	//---Client
	public static final int MT_REQ_CCE_SEND_EVENT_INFO = 0x140;
	
	//---Server
	public static final int MT_REQ_SCE_CREATE_EVENT = 0x140;
	
	//-----------------
	// Synchronize Data from local database
	//------------------
	
	//---Client
	public static final int MT_REQ_CSYN_DFLDB_PREPARE_PRODUCT = 0x160;
	public static final int MT_REQ_CSYN_DFLDB_SYNCHRONIZE_REQUEST = 0x161;
	public static final int MT_REQ_CSYN_DFLDB_SEND_PRODUCT = 0x162;
	public static final int MT_REQ_CSYN_DFLDB_SEND_PRODUCT_LAST = 0x163;
	
	//---Server
	public static final int MT_REQ_SSYN_DFLDB_READY = 0x161;
	public static final int MT_REQ_SSYN_DFLDB_UPDATE_PRODUCT = 0x162;
	public static final int MT_REQ_SSYN_DFLDB_UPDATE_PRODUCT_LAST = 0x163;
	
	//---------------------------------------
	// Synchronize Data from Server database
	//---------------------------------------
	
	//----Client
	public static final int MT_REQ_CSYN_DFSDB_UPDATE_REQUEST = 0x180;
	public static final int MT_REQ_CSYN_DFSDB_UPDATING_DB = 0x181;
	public static final int MT_REQ_CSYN_DFSDB_UPDATING_DB_LAST = 0x182;
	
	//----Server
	public static final int MT_REQ_SSYN_DFSDB_UPDATED_PRODUCT = 0x181;
	public static final int MT_REQ_SSYN_DFSDB_UPDATED_PRODUCT_LAST = 0x182;
	public static final int MT_REQ_SSYN_DFSDB_NO_UPDATED = 0x183;
	
	//-----------------
	// Stack-Take an Event
	//------------------
	
	public static final int MT_REQ_CSTE_STOCKTAKE_REQUEST = 0x200;
	public static final int MT_REQ_CSTE_GET_DEBT_TABLE = 0x201;
	
	
	public static final int MT_REQ_SSTE_STOCK_TAKE_FINISH = 0x201;
	public static final int MT_REQ_SSTE_STOCK_TAKE_NOT_READY = 0x202;
	
	//-----------------
	// Next
	//------------------

}
